<div style="min-width:1100px;">
  <nz-breadcrumb class="breadcrumb-pos">
    <i nz-icon type="link" theme="outline" style="color:#1890FF;padding-right:4px"></i>
    <nz-breadcrumb-item>
      <a routerLink="/main/tasklist">工单管理</a>
    </nz-breadcrumb-item>
    <nz-breadcrumb-item>
      工单详情
    </nz-breadcrumb-item>
  </nz-breadcrumb>
  <div class="form-div">
    <button class="add_btn" nz-button nzType="primary" routerLink="/main/tasklist">返回</button>
    <br>
    <h4>工单信息详情</h4>
    <table>
      <tr>
        <td>
          <div>工单号</div>
          <div>：</div>
          <div>{{taskinfo[0].number}}</div>
        </td>
        <td>
          <div>租户名</div>
          <div>：</div>
          <div>{{userinfo[0].name}}</div>
        </td>
        <td>
          <div>维修员</div>
          <div>：</div>
          <div>{{maintinfo[0].name}}</div>
        </td>
        <td>
          <div>状态</div>
          <div>：</div>
          <div>{{taskinfo[0].statusStr}}</div>
        </td>
        <td>
          <div>完成效率</div>
          <div>：</div>
          <div>{{taskinfo[0].completeEfficiency}}</div>
        </td>
      </tr>
      <tr>

        <td>
          <div>租户地址</div>
          <div>：</div>
          <div>{{userinfo[0].address}}</div>
        </td>
        <td>
          <div>故障条数</div>
          <div>：</div>
          <div>{{taskinfo[0].faultNum}}</div>
        </td>
        <td>
          <div>预警条数</div>
          <div>：</div>
          <div>{{taskinfo[0].warnNum}}</div>
        </td>
        <td>
          <div>任务时长</div>
          <div>：</div>
          <div>{{taskinfo[0].taskDuration}}</div>
        </td>
        <td>
          <div>路程时长</div>
          <div>：</div>
          <div>{{taskinfo[0].distanceDuration}}</div>
        </td>
      </tr>
      <tr>
        <td>
          <div>派单时间</div>
          <div>：</div>
          <div>{{taskinfo[0].startDate?taskinfo[0].startDate.slice(0,10):"--"}}</div>
        </td>
        <td>
          <div>到达时间</div>
          <div>：</div>
          <div>{{taskinfo[0].reachDate?taskinfo[0].reachDate.slice(0,10):"--"}}</div>
        </td>
        <td>
          <div>完成时间</div>
          <div>：</div>
          <div>{{taskinfo[0].finishDate?taskinfo[0].finishDate.slice(0,10):"--"}}</div>
        </td>
        <td>
          <div>添加时间</div>
          <div>：</div>
          <div>{{taskinfo[0].dateAdd?taskinfo[0].dateAdd.slice(0,10):"--"}}</div>
        </td>
        <td>
          <div>修改时间</div>
          <div>：</div>
          <div>{{taskinfo[0].dateUpdate?taskinfo[0].dateUpdate.slice(0,10):"--"}}</div>
        </td>
      </tr>
    </table>
    <br>
    <h4>工单任务列表</h4>
    <nz-table #basicTable [nzData]="tasklist" [nzShowPagination]="false" [nzBordered]="true">
      <thead>
        <tr>
          <th>设备名称</th>
          <th>任务名称</th>
          <th>任务类型</th>
          <th>任务级别</th>
          <th>任务代码</th>
          <th>状态</th>
          <th>创建时间</th>
          <th>任务所需时间</th>
        </tr>
      </thead>
      <tbody>
        <tr *ngFor="let data of tasklist">
          <td>{{data.printerName}}</td>
          <td>{{data.taskName}}</td>
          <td>{{data.type==0?"故障":"预警"}}</td>
          <td>{{data.level}}</td>
          <td>{{data.taskCode}}</td>
          <td>{{data.statusStr}}</td>
          <td>{{data.dateAdd.slice(0,10)}}</td>
          <td>{{data.taskDuration}}小时</td>
        </tr>
      </tbody>
    </nz-table>
    <nz-pagination style="float:right;margin-top:12px" [nzPageIndex]="PageIndex" [nzPageSize]="PageSize"
      [nzTotal]="PageTotal" (nzPageIndexChange)="PageIndexChange($event)" [nzHideOnSinglePage]="true"
      [nzShowTotal]="totalTemplate"></nz-pagination>
    <ng-template #totalTemplate let-total>
      共 {{total}} 条数据
    </ng-template>
  </div>
</div>